class Person:
    def __init__(self, name):
        self.name = name

    def __add__(self, other):
        if not isinstance(other, Person):
            raise "不同类型不能进行+运算"
        return Person("{}-{}".format(self.name, other.name))

    def __mul__(self, n):
        if not isinstance(n, int):
            raise "需要一个整数"
        return [Person("{}#{}".format(self.name, p + 1)) for p in range(n)]

    def __str__(self):
        return "Person {{name: '{0}'}}".format(self.name)


p1 = Person("张三")
p2 = Person("李四")
p3 = p1 + p2
print(p3)

ps = p1 * 4
for p in ps:
    print(p)
